<template>
	<view class="">
		<u-gap height="100" ></u-gap>
		<view class="footprice">
			   <block v-if="show">
				   <view class=""><text class="desc">共{{total}}小项合计:</text><text class="price1">￥{{total_price}}</text></view>
				   
				   <view class="cart btn u-line-1 qz" @click="qz()" v-if="qzshow">重置</view>
				   
				   <view  @click="jump" class="cart btn u-line-1 jump">{{title}}</view>
			   </block>
				 
				  <slot />
				  
		</view>
		
	</view>
</template>

<script>
	import {mapState,mapGetters} from "vuex"
	export default {
		props: {
			show: {
				type:Boolean,
				default: true
			},
			qzshow: {
				type:Boolean,
				default: true
			},
			title: {
				type: String,
				default: "下一步"
			},
			url:{
				type:String,
				default:"/pages/index/index"
			}
		},
		computed:{
			...mapGetters(["total","total_price"])
		},
		created:function(){
			console.log(this.$store.getters.total)
		},
		methods:{
			qz(){
				this.$store.commit('change_select',{field:"sb_select",value:[]});
				
			},
			jump(){
				this.$emit("click")
			}
		}
	
	}
</script>

<style>
	
	.footprice {
		position: fixed;
		bottom: 0px;
		height: 50px;
		justify-content: flex-end;
		display: flex;
		background-color: #FFFFFF;
		border-top: 1px solid #eee;
		z-index: 1000;
		align-items: center;
		width: 100%;
	}
	.footprice .desc{ color: #888888;}
	
	.cart {
		margin-left: 10px;
		background-color: #ed3f14;
		margin-right: 10rpx;
	}
	.price1 {
		color: red;
		font-size: 22px;
	}
	.qz{ margin-right: 0rpx; background:#555555}
	.btn {
		line-height: 66rpx;
		padding: 0 40rpx;
		border-radius: 36rpx;
		color: #ffffff;
	}
	.jump{padding: 0 60rpx;}
</style>
